﻿
namespace ShareMarking.Entity
{
    using System;


    /// <summary>
    /// 表名：qr_DiyCode 主键列：id
    /// </summary>
    [SerializableAttribute()]
    public partial class qr_DiyCode : MySoft.Data.Entity
    {

        protected Int32 _id;

        protected String _scene_id;

        protected Int32 _type;

        protected String _code_url;

        protected String _source_url;

        protected String _qrcode_url;

        protected Boolean _isdelete;

        protected DateTime? _CreateOn;

        protected DateTime? _DateModified;

        public Int32 id
        {
            get
            {
                return this._id;
            }
            set
            {
                this.OnPropertyValueChange(_.id, _id, value);
                this._id = value;
            }
        }

        /// <summary>
        /// 二维码唯一场景值
        /// </summary>
        public String scene_id
        {
            get
            {
                return this._scene_id;
            }
            set
            {
                this.OnPropertyValueChange(_.scene_id, _scene_id, value);
                this._scene_id = value;
            }
        }

        /// <summary>
        /// 二维码类型
        /// </summary>
        public Int32 type
        {
            get
            {
                return this._type;
            }
            set
            {
                this.OnPropertyValueChange(_.type, _type, value);
                this._type = value;
            }
        }

        /// <summary>
        /// 二维码短码
        /// </summary>
        public String code_url
        {
            get
            {
                return this._code_url;
            }
            set
            {
                this.OnPropertyValueChange(_.code_url, _code_url, value);
                this._code_url = value;
            }
        }

        public String source_url
        {
            get
            {
                return this._source_url;
            }
            set
            {
                this.OnPropertyValueChange(_.source_url, _source_url, value);
                this._source_url = value;
            }
        }

        /// <summary>
        /// 二维码存放路径
        /// </summary>
        public String qrcode_url
        {
            get
            {
                return this._qrcode_url;
            }
            set
            {
                this.OnPropertyValueChange(_.qrcode_url, _qrcode_url, value);
                this._qrcode_url = value;
            }
        }

        /// <summary>
        /// 是否删除
        /// </summary>
        public Boolean isdelete
        {
            get
            {
                return this._isdelete;
            }
            set
            {
                this.OnPropertyValueChange(_.isdelete, _isdelete, value);
                this._isdelete = value;
            }
        }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateOn
        {
            get
            {
                return this._CreateOn;
            }
            set
            {
                this.OnPropertyValueChange(_.CreateOn, _CreateOn, value);
                this._CreateOn = value;
            }
        }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? DateModified
        {
            get
            {
                return this._DateModified;
            }
            set
            {
                this.OnPropertyValueChange(_.DateModified, _DateModified, value);
                this._DateModified = value;
            }
        }

        /// <summary>
        /// 获取实体对应的表名
        /// </summary>
        protected override MySoft.Data.Table GetTable()
        {
            return new MySoft.Data.Table<qr_DiyCode>("qr_DiyCode");
        }

        /// <summary>
        /// 获取实体中的标识列
        /// </summary>
        protected override MySoft.Data.Field GetIdentityField()
        {
            return _.id;
        }

        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        protected override MySoft.Data.Field[] GetPrimaryKeyFields()
        {
            return new MySoft.Data.Field[] {
    					_.id};
        }

        /// <summary>
        /// 获取列信息
        /// </summary>
        protected override MySoft.Data.Field[] GetFields()
        {
            return new MySoft.Data.Field[] {
    					_.id,
    					_.scene_id,
    					_.type,
    					_.code_url,
    					_.source_url,
    					_.qrcode_url,
    					_.isdelete,
    					_.CreateOn,
    					_.DateModified};
        }

        /// <summary>
        /// 获取列数据
        /// </summary>
        protected override object[] GetValues()
        {
            return new object[] {
    					this._id,
    					this._scene_id,
    					this._type,
    					this._code_url,
    					this._source_url,
    					this._qrcode_url,
    					this._isdelete,
    					this._CreateOn,
    					this._DateModified};
        }

        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        protected override void SetValues(MySoft.Data.IRowReader reader)
        {
            if ((false == reader.IsDBNull(_.id)))
            {
                this._id = reader.GetInt32(_.id);
            }
            if ((false == reader.IsDBNull(_.scene_id)))
            {
                this._scene_id = reader.GetString(_.scene_id);
            }
            if ((false == reader.IsDBNull(_.type)))
            {
                this._type = reader.GetInt32(_.type);
            }
            if ((false == reader.IsDBNull(_.code_url)))
            {
                this._code_url = reader.GetString(_.code_url);
            }
            if ((false == reader.IsDBNull(_.source_url)))
            {
                this._source_url = reader.GetString(_.source_url);
            }
            if ((false == reader.IsDBNull(_.qrcode_url)))
            {
                this._qrcode_url = reader.GetString(_.qrcode_url);
            }
            if ((false == reader.IsDBNull(_.isdelete)))
            {
                this._isdelete = reader.GetBoolean(_.isdelete);
            }
            if ((false == reader.IsDBNull(_.CreateOn)))
            {
                this._CreateOn = reader.GetDateTime(_.CreateOn);
            }
            if ((false == reader.IsDBNull(_.DateModified)))
            {
                this._DateModified = reader.GetDateTime(_.DateModified);
            }
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            if ((obj == null))
            {
                return false;
            }
            if ((false == typeof(qr_DiyCode).IsAssignableFrom(obj.GetType())))
            {
                return false;
            }
            if ((((object)(this)) == ((object)(obj))))
            {
                return true;
            }
            return false;
        }

        public class _
        {

            /// <summary>
            /// 表示选择所有列，与*等同
            /// </summary>
            public static MySoft.Data.AllField All = new MySoft.Data.AllField<qr_DiyCode>();

            /// <summary>
            /// 字段名：id - 数据类型：Int32
            /// </summary>
            public static MySoft.Data.Field id = new MySoft.Data.Field<qr_DiyCode>("id");

            /// <summary>
            /// 二维码唯一场景值 - 字段名：scene_id - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field scene_id = new MySoft.Data.Field<qr_DiyCode>("scene_id");

            /// <summary>
            /// 二维码类型 - 字段名：type - 数据类型：Int32
            /// </summary>
            public static MySoft.Data.Field type = new MySoft.Data.Field<qr_DiyCode>("type");

            /// <summary>
            /// 二维码短码 - 字段名：code_url - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field code_url = new MySoft.Data.Field<qr_DiyCode>("code_url");

            /// <summary>
            /// 原网址：source_url - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field source_url = new MySoft.Data.Field<qr_DiyCode>("source_url");

            /// <summary>
            /// 二维码存放路径 - 字段名：qrcode_url - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field qrcode_url = new MySoft.Data.Field<qr_DiyCode>("qrcode_url");

            /// <summary>
            /// 是否删除 - 字段名：isdelete - 数据类型：Boolean
            /// </summary>
            public static MySoft.Data.Field isdelete = new MySoft.Data.Field<qr_DiyCode>("isdelete");

            /// <summary>
            /// 创建时间 - 字段名：CreateOn - 数据类型：DateTime(可空)
            /// </summary>
            public static MySoft.Data.Field CreateOn = new MySoft.Data.Field<qr_DiyCode>("CreateOn");

            /// <summary>
            /// 更新时间 - 字段名：DateModified - 数据类型：DateTime(可空)
            /// </summary>
            public static MySoft.Data.Field DateModified = new MySoft.Data.Field<qr_DiyCode>("DateModified");
        }
    }
}

